package com.example.manager.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.manager.entity.Employees;
import com.example.manager.mapper.EmployeesMapper;
import com.example.manager.service.EmployeesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author fwy
 * @since 2024-07-18
 */
@Service
public class EmployeesServiceImpl extends ServiceImpl<EmployeesMapper, Employees> implements EmployeesService {

    @Resource
    private EmployeesMapper employeesMapper;

    @Override
    public IPage pageC(IPage<Employees> page) {
        return employeesMapper.pageC(page);
    }

    @Override
    public IPage pageCC(IPage<Employees> page, Wrapper wrapper) {
        return employeesMapper.pageCC(page,wrapper);
    }

    @Override
    public List<Employees> getAllEmployees() {
        return employeesMapper.selectAll();
    }


    @Override
    public boolean removeById(String employeeId) {
        return employeesMapper.deleteById(employeeId) > 0;
    }
}
